# Contributor: Damian Kurek <starfire24680@gmail.com>
# Maintainer: Damian Kurek <starfire24680@gmail.com>
pkgname=kodi-audioencoder-vorbis
pkgver=19.0.1
_realname=Matrix
pkgrel=0
pkgdesc="Vorbis encoder addon for Kodi"
options="!check" # no test suite
url="https://github.com/xbmc/audioencoder.vorbis"
arch="x86 x86_64 aarch64 armv7" # kodi
license="GPL-2.0-only"
makedepends="cmake libvorbis-dev kodi-dev"
source="$pkgname-$pkgver-$_realname.tar.gz::https://github.com/xbmc/audioencoder.vorbis/archive/$pkgver-$_realname.tar.gz"
builddir="$srcdir/audioencoder.vorbis-$pkgver-$_realname"

build() {
	cmake -B build \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_MODULE_PATH=/usr/lib/cmake/kodi \
		-DUSE_LTO=1
	make -C build
}

package() {
	make -C build DESTDIR="$pkgdir" install
}

sha512sums="
e8f7c6b73c248aaa3d570402475fa1f1cb47d525ad18865afa66271dd7e897d06ac5f1dd645cf018676c4f7b30e51f875a6d092c71e4e9972dbfecb89eaca648  kodi-audioencoder-vorbis-19.0.1-Matrix.tar.gz
"
